package org.robot.dao;

import java.util.List;

import org.robot.pojo.Paper;
import org.robot.pojo.PaperDoc;
import org.robot.utils.StrUtils;

public class PaperDocDao extends BaseDao {

    public static void addPaperDoc(List<PaperDoc> paperDocList) {
    	if (!paperDocList.isEmpty()) {
    		PaperDoc paperDoc = paperDocList.get(0);
    		List<PaperDoc> list = list(PaperDoc.class, "where paperid = ? and taskid = ?", paperDoc.getPaperid(), paperDoc.getTaskid());
    		if (list.isEmpty()) {
    			paperDocList.forEach(pd -> {
    				pd.setInsertTime(StrUtils.getCurrentDateTime());
    				pd.setStatus(1L);
    				try {
    					save(pd);
    				} catch (Exception e) {
    					e.printStackTrace();
    				}
    			});
    		}
    	}
    }
    
    public static void main(String[] args) throws Exception {
        Paper paper = new Paper();
        paper.setTitle("Electrolyte Replacement Strips and their Perceived Effect on Performance and Cramping:A Survey Study");
        paper.setDoi("10.5005/jp-journals-10017-1095");
        paper.setAbstracts("Prospective Cohort Studies Electrolyte Replacement Strips and their Perceived Effect on Performance and Cramping:A Survey Study David J Berkoff, Blake Boggess, Cameron Howes, Samuel Boggess, Claude T Moorman III Author Affiliation Blake Boggess : Department of Orthopaedics, Duke University, Durham, North Carolina, USA; Department of Community and Family Medicine Duke University, Durham, North Carolina, USA 10.5005/jp-journals-10017-1095 ABSTRACT Exercising athletes lose electrolytes during exercise. Hydration and electrolyte supplementation have been extensively researched regarding cramping and performance, often with conflicting results. The purpose was to study the perceived impact electrolyte replacement strips have on cramping and recovery. These strips are absorbed buccally, bypassing the gastrointestinal route. Materials and methods:Our hypothesis was: During exercise, subjects using electrolyte replacement strips will feel that performance, cramping, and recovery are improved. The electrolyte strips used, Enlyten SportStrips™ a product of Healthsport Inc., are a bioabsorbable strip containing sodium, chloride, and potassium. A total of 100 subjects participated in this survey study. The institutional review board approved the study and waived consent. Subjects completed a survey addressing their perceptions of the effects of using electrolyte strips during exercise. Questions were related to cramping, performance, and overall perception of how hydration and electrolytes affect these parameters, specifically addressing the effectiveness of these electrolyte strips. Results:Average age of subjects was 29.5 years, with 81 males and 18 females (one subject did not indicate gender); 69% of the subjects used the product correctly. On the survey, “Agree” represented a score of 4 or 5 on a 5-point Likert scale; 94% of subjects believe that hydration helps performance, 71% believe that electrolytes help performance, and 49% believe that sports drinks help performance; 81% believe that electrolytes prevent cramping, and 56% believe that sports drinks prevent cramping. There were differences in responses between correct and incorrect users of the strips: 74% of those who used the product correctly felt that strips help performance, compared with 51% of incorrect (p > 0.05); 69% of those using the strips correctly indicated that they cramped less when using the strips, compared with 61% of those using them incorrectly (p > 0.05); 63% of those using the strips correctly indicated that they recovered quicker with the strips, compared with 32% of those using them incorrectly (p =0.005). Conclusion:Athletes identify hydration and electrolytes as important components to preventing cramping and enhancing performance. During exercise, a majority of respondents felt that electrolyte strips helped performance, reduced cramping, and enhanced recovery. Those who used the product correctly tended to find the product more beneficial. Electrolyte supplementation may play a role in enhanced performance and recovery in exercising athletes. Buccal absorption is emerging in a variety of markets, and its use for athletic performance is a logical next step. Keywords:Electrolytes, Enlyten, Exercise, Recovery. How to cite this article:Berkoff DJ, Boggess B, Howes C, Boggess S, Moorman III CT. Electrolyte Replacement Strips and their Perceived Effect on Performance and Cramping: A Survey Study. The Duke Orthop J 2018;8(1):49-54. Source of support: Funding for the study was provided by a grant from Healthsport Inc., the company that manufactures Enlyten SportStrips™. Conflict of interest: An author, Claude T Moorman III, is on the medical advisory board for Enlyten SportStrips™. | Full Text PDF | FREE | Rights & Permissions| Views 235 | Citations 0 ABSTRACT Exercising athletes lose electrolytes during exercise. Hydration and electrolyte supplementation have been extensively researched regarding cramping and performance, often with conflicting results. The purpose was to study the perceived impact electrolyte replacement strips have on cramping and recovery. These strips are absorbed buccally, bypassing the gastrointestinal route. Materials and methods:Our hypothesis was: During exercise, subjects using electrolyte replacement strips will feel that performance, cramping, and recovery are improved. The electrolyte strips used, Enlyten SportStrips™ a product of Healthsport Inc., are a bioabsorbable strip containing sodium, chloride, and potassium. A total of 100 subjects participated in this survey study. The institutional review board approved the study and waived consent. Subjects completed a survey addressing their perceptions of the effects of using electrolyte strips during exercise. Questions were related to cramping, performance, and overall perception of how hydration and electrolytes affect these parameters, specifically addressing the effectiveness of these electrolyte strips. Results:Average age of subjects was 29.5 years, with 81 males and 18 females (one subject did not indicate gender); 69% of the subjects used the product correctly. On the survey, “Agree” represented a score of 4 or 5 on a 5-point Likert scale; 94% of subjects believe that hydration helps performance, 71% believe that electrolytes help performance, and 49% believe that sports drinks help performance; 81% believe that electrolytes prevent cramping, and 56% believe that sports drinks prevent cramping. There were differences in responses between correct and incorrect users of the strips: 74% of those who used the product correctly felt that strips help performance, compared with 51% of incorrect (p > 0.05); 69% of those using the strips correctly indicated that they cramped less when using the strips, compared with 61% of those using them incorrectly (p > 0.05); 63% of those using the strips correctly indicated that they recovered quicker with the strips, compared with 32% of those using them incorrectly (p =0.005). Conclusion:Athletes identify hydration and electrolytes as important components to preventing cramping and enhancing performance. During exercise, a majority of respondents felt that electrolyte strips helped performance, reduced cramping, and enhanced recovery. Those who used the product correctly tended to find the product more beneficial. Electrolyte supplementation may play a role in enhanced performance and recovery in exercising athletes. Buccal absorption is emerging in a variety of markets, and its use for athletic performance is a logical next step. Keywords:Electrolytes, Enlyten, Exercise, Recovery. How to cite this article:Berkoff DJ, Boggess B, Howes C, Boggess S, Moorman III CT. Electrolyte Replacement Strips and their Perceived Effect on Performance and Cramping: A Survey Study. The Duke Orthop J 2018;8(1):49-54. Source of support: Funding for the study was provided by a grant from Healthsport Inc., the company that manufactures Enlyten SportStrips™. Conflict of interest: An author, Claude T Moorman III, is on the medical advisory board for Enlyten SportStrips™.");
        paper.setPdfUrl("http://www.jaypeejournals.com/eJournals/ArticleDetail.aspx?AID=19&ID=1102&topicid=14142#");
        paper.setIssueId(9563107L); 
        paper.setTaskid(636L);
        paper.setWebsite("http://www.jaypeejournals.com/eJournals/ArticleDetail.aspx?AID=19&ID=1102&topicid=14142");
//        addPaper(paper);
        
        
//        Field[] fields = paper.getClass().getDeclaredFields();
//        for (Field field : fields) {
//        	field.setAccessible(true);
//        	Class<?> type = field.getType();
//        	System.out.println(type);
//        	Object object = field.get(paper);
//        	if (object != null) {
//        		String value = object.toString();
//        		if (type == Long.class || type == long.class)
//        			System.out.println(Long.parseLong(value));
//        	}
//		}
        System.out.println("s™.".length());
    }
}
